var Account = function(username, name, status) {
    this.username = username || "";
    this.display = name || "";
    this.status = status || false;
  
};

var Room = function(id, creator, createdDate) {
    this.roomID = id || 0;
    this.creator = creator || new Account();
    this.createdDate = date || new Date($.now());
    this.lastUpdate = new Date($.now());

    var messages = [];
    var participants = [];

    this.addParticipant = function(participant) {
        participant.push(participant);
    }

    this.getCount = function() {
        return participants.length;
    }

    this.addMessage = function(message) {
        messages.push(message);
    }
}

var Message = function(id, room, sentTime, content, account) {
    this.messageID = id || 0;
    this.room = room || new Room();
    this.sentTime = sentTime || new Date($.now());
    this.content = content || "";
    this.account = account || new Account();
}
